package com.benlai.newretail.config.dbconfig;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * @author:gaoxu;
 * @Email:gaoxu@benlai.com
 * @DATE:2017-12-04
 * @version:ver1.0.0
 * @Description: Created by gaoxu on 2017-12-04.
 */

public class DynamicDataSource extends AbstractRoutingDataSource {
    @Override
    protected Object determineCurrentLookupKey() {
        return DynamicDataSourceContextHolder.getDataSourceType();
    }
}
